/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.report.mapper.statistics;

import com.koron.report.bean.DangerAnalysis;
import com.koron.report.bean.riskanddanger.HiddenDangerDiscoveryDto;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface HiddenDangerDiscoveryStatisticMapper {


    /**
     * 隐患统计展示的隐患列表
     * @param corpCodeList
     * @param gridCodeList
     * @param startTime
     * @param endTime
     * @param start
     * @param rows
     * @return
     */
    List<HiddenDangerDiscoveryDto> queryDangerListByCondition(@Param("corpCodeList") List<String> corpCodeList, @Param("gridCodeList") List<String> gridCodeList,
                                                              @Param("startTime") Date startTime, @Param("endTime") Date endTime,
                                                              @Param("start") Integer start, @Param("rows") Integer rows);

    /**
     * 隐患统计分析展示的隐患总数量
     * @param corpCodeList
     * @param gridCodeList
     * @param startTime
     * @param endTime
     * @return
     */
    Integer countDangerListByCondition(@Param("corpCodeList") List<String> corpCodeList, @Param("gridCodeList") List<String> gridCodeList,
                                       @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    /**
     * 统计某个层级下子层级所有已经确认为隐患的不包含整改情况的信息
     * 层级分为：集团、片区
     * @param nomarlDangerCount
     * @param importantDangerCount
     * @param managerDangerCount
     * @param deviceDangerCount
     * @param meterialDangerCount
     * @param personDangerCount
     * @param GoodsDangerCount
     * @param enviropmentDangerCount
     * @param updateTimeStart
     * @param updateTimeEnd
     * @param cropCodeList
     * @param gridCodeList
     * @return
     */
    DangerAnalysis queryDangerAnalysisList(@Param("nomarlDangerCount") String nomarlDangerCount, @Param("importantDangerCount") String importantDangerCount,
                                           @Param("managerDangerCount") String managerDangerCount, @Param("deviceDangerCount") String deviceDangerCount, @Param("meterialDangerCount") String meterialDangerCount,
                                           @Param("personDangerCount") String personDangerCount, @Param("GoodsDangerCount") String GoodsDangerCount,
                                           @Param("enviropmentDangerCount") String enviropmentDangerCount, @Param("updateTimeStart") Date updateTimeStart,
                                           @Param("updateTimeEnd") Date updateTimeEnd, @Param("cropCodeList") List<String> cropCodeList, @Param("gridCodeList") List<String> gridCodeList);

    /**
     * 统计某个层级下子层级所有已经确认为隐患的整改情况
     * 层级分为：集团、片区
     * @param unreformCount
     * @param alreadyReformCount1
     * @param reformingCount
     * @param alreadyReformCount2
     * @param refuseReformCount
     * @param updateTimeStart
     * @param updateTimeEnd
     * @param cropCodeList
     * @param gridCodeList
     * @return
     */
    DangerAnalysis queryDangerPrecautionAnalysisList(@Param("unreformCount") String unreformCount, @Param("alreadyReformCount1") String alreadyReformCount1,
                                                     @Param("reformingCount") String reformingCount, @Param("alreadyReformCount2") String alreadyReformCount2,
                                                     @Param("refuseReformCount") String refuseReformCount, @Param("updateTimeStart") Date updateTimeStart,
                                                     @Param("updateTimeEnd") Date updateTimeEnd, @Param("cropCodeList") List<String> cropCodeList,
                                                     @Param("gridCodeList") List<String> gridCodeList);

    /**
     * 统计某个层级下子层级所有已经确认为隐患的不包含整改情况的信息
     * 层级分为：水司
     * @param nomarlDangerCount
     * @param importantDangerCount
     * @param managerDangerCount
     * @param deviceDangerCount
     * @param meterialDangerCount
     * @param personDangerCount
     * @param GoodsDangerCount
     * @param enviropmentDangerCount
     * @param updateTimeStart
     * @param updateTimeEnd
     * @param corpCode
     * @return
     */
    List<DangerAnalysis> queryDangerAnalysisListLevelCorp(@Param("nomarlDangerCount") String nomarlDangerCount, @Param("importantDangerCount") String importantDangerCount,
                                                          @Param("managerDangerCount") String managerDangerCount, @Param("deviceDangerCount") String deviceDangerCount, @Param("meterialDangerCount") String meterialDangerCount,
                                                          @Param("personDangerCount") String personDangerCount, @Param("GoodsDangerCount") String GoodsDangerCount,
                                                          @Param("enviropmentDangerCount") String enviropmentDangerCount, @Param("updateTimeStart") Date updateTimeStart,
                                                          @Param("updateTimeEnd") Date updateTimeEnd, @Param("corpCode") String corpCode);
}
